<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ include file="/commons/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <title>修改密码</title>
    <link rel="shortcut icon" href="${ctx}/dep/moban/img/favicon.png" type="image/x-icon">
    <!--Basic Styles-->
    <link href="${ctx}/dep/moban/css/bootstrap.min.css" rel="stylesheet" />
    <link href="${ctx}/dep/moban/css/font-awesome.min.css" rel="stylesheet" />
    <!--Beyond styles-->
    <link href="${ctx}/dep/moban/css/beyond.min.css" rel="stylesheet" />
    <link href="${ctx}/dep/moban/css/demo.min.css" rel="stylesheet" />
    <link href="${ctx}/dep/moban/css/animate.min.css" rel="stylesheet" />
    <link rel="stylesheet" href="${ctx}/home/card/card.css">
    <link rel="stylesheet" href="${ctx}/home/common/css.css">
</head>
<body>
<div class="wrapper">
    <div class="page-breadcrumbs">
        <ul class="breadcrumb">
            <li>
                <i class="fa fa-home"></i>
                <a href="index.html">首页</a>
            </li>
            <li class="active">
                <a href="#">修改密码</a>
            </li>
        </ul>
    </div>
    <div class="page-header position-relative">
        <div class="header-title">
            <h1>修改密码</h1>
        </div>
        <!--Header Buttons-->
        <div class="header-buttons">
            <a class="sidebar-toggler" href="#">
                <i class="fa fa-arrows-h"></i>
            </a>
            <a class="refresh" id="refresh-toggler" href="">
                <i class="glyphicon glyphicon-refresh"></i>
            </a>
            <a class="fullscreen" id="fullscreen-toggler" href="#">
                <i class="glyphicon glyphicon-fullscreen"></i>
            </a>
        </div>
        <!--头部按钮end-->
    </div>
    <div class="page-body">
        <div class="row">
            <div class="col-xs-12 col-md-12">
                <div class="widget">
                    <div class="widget-body" style="overflow:hidden">
                        <div class="col-lg-12 col-sm-12 col-xs-12">
                            <div class="widget">
                                <div class=" bancgud" >
                                    <form class="form-horizontal form-bordered" id="registrationForm">
                                        <div class="widget">
                                            <div class="form-group hypading">
                                                <label class="col-sm-3 control-label no-padding-right">旧密码<span class="help-inline"><font color="red">*</font> </span></label>
                                                <div class="col-sm-6">
                                                    <input type="password" class="form-control" placeholder="请输入旧密码" name="password">
                                                </div>
                                            </div>
                                            <div class="form-group hypading">
                                                <label class="col-sm-3 control-label no-padding-right">新密码<span class="help-inline"><font color="red">*</font> </span></label>
                                                <label class="col-sm-6">
                                                    <input class="form-control"  type="password" placeholder="请输入新密码" name="newPassword">
                                                </label>
                                            </div>
                                            <div class="form-group hypading">
                                                <label class="col-sm-3 control-label no-padding-right">确认新密码<span class="help-inline"><font color="red">*</font> </span></label>
                                                <div class="col-sm-6">
                                                    <input type="password" class="form-control" placeholder="请再次输入密码" name="repassword">
                                                </div>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                            <div class="col-sm-8 col-lg-offset-3 col-xs-offset-1 col-md-offset-2 btn-bottm ">
                                <button id="tagIdSubmitAddVip_btn" type="submit" class=" btn btn-darkorange  col-sm-2 col-xs-offset-3" data-toggle="modal">确认</button>
                                <button class=" btn btn-active col-sm-2 col-xs-offset-3" type="button" onClick="history.go(-1)">取消</button>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--Basic Scripts-->
<script src="${ctx}/dep/moban/js/jquery-2.0.3.min.js"></script>
<script src="${ctx}/dep/moban/js/bootstrap.min.js"></script>
<script src="${ctx}/dep/moban/js/beyond.min.js"></script>
<script src="${ctx}/dep/jquery.selectlist.js"></script>

<script type="text/javascript" src="${ctx}/dep/validation/bootstrapValidator.js"></script>

<script type="text/javascript">
    
   	$(function(){
   		$("#tagIdSubmitAddVip_btn").click(function(){
   			$.ajax({
   				url : "${ctx}/sysUser/resetPassword",
   				type : "POST",
   				data : $("#registrationForm").serialize(),
   				dataType : "json",
   				success : function(data) {
   					if($(data)[0]["code"]=="1"){
   						alert($(data)[0]["msg"]);
   						window.location.href = "${ctx}/sysUser/index";
   					}else{
   						alert($(data)[0]["msg"]);
   					}
   				}
   			});
   		})
   	})
</script>
</body>
</html>
